package com.cloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 通知与用户关联表
 *
 * @author yzj
 * @since 2022-04-18
 */
@Data
@Schema(name = "SysNoticeUser对象", description = "系统管理")
@TableName("sys_notice_user")
public class SysNoticeUser {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "通知ID")
    private Long noticeId;

    @Schema(description = "角色ID")
    private Long roleId;

    @Schema(description = "部门ID")
    private Long deptId;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "阅读状态（0未读 1已读）")
    private Integer readStatus;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("noticeId", getNoticeId())
                .append("userId", getUserId())
                .append("readStatus", getReadStatus())
                .toString();
    }

}
